Improve test coverage of variable handling for included tasks