Improve xml parameter entity parsing, and add a new ERT test.