Prioritize scope names over attributes names when finding valid predicates