Use nested dict comprehensions to avoid value overwriting