Path index improvements

Commit messages should be self-explainatory.

NOTE: I didn't test `applyNotEq` as I have no idea how to unittest it (without making the test completely useless).