Merge "Fix crash if AM returns empty task list" into tm-dev