Different results are even more strange … I guess it has something to do with \n
being a control sequence. But I don’t know why it is not escaped. When I add braces to the entry – \newcommand\x{X}
for instance – the entry is saved with single quotes and everything works …
Hope that @bastianallgeier or someone else has a solution for that