Fix invalid dict comprehension syntax by unraveling