It’s hard to debug this after the cleanup as the classes get changed to active. It’s probably something that could be fixed with the nav_rejig branch though, which simplifies what gets an active class applied.
If you could try implementing the changes there and report back, that would be great.