#359 reproduced in test
fixes #359 by stricter checking of XML element content