Fix a bug where the compiler could fail to properly report non-callable terms used as goals in predicate clauses