Generalize previous optimization to Logtalk built-in predicates