Why is the xml declaration removed? It has caused issues earlier so I would prefer it to be kept in the tests.