Add support for cutting off work when the goal is reached (and environment-based specialization of nested rules)