Explicitly load library(apply) to avoid autoload inside goal_expansion
leading to discontiguous predicate messages.