Fix parsing of tasks with variable module names

Also adding an integration test for same.