Fix bug in the compiler code that finds the original name of an aliased predicate where complementing categories would not be checked in the correct order