Fixes problem where predicates are not honored at the end of paths