Fix static determination for include_tasks
Fix static determination for include_tasks

An incorrect removal of a conditional resulted in include_tasks falling
through to the old static detection mechanism incorrectly. This restores
the previous conditional check.

Fixes #31593

thaim/ansible,thaim/ansible