performance tweak for subtask_all predicate