big refactor on the way getPredicates works. Now it is a unified method which gathers predicates from all substitutions. It also searches on nested substitutions