Fixes #4476: Correct the XML pretty printer to always preserve spaces