* Further restrict caching of loop when the task actually had a loop. Fixes #44874 * Extend tests for loop caching