Fix bug where an instantiation error in a `mode/2` predicate directive would be missed