Primarily I did this because the JAXB generation failed after my change and it took me a while to understand that this was caused by inserting a new type declaration before the `beanType` definition. I think it's more robust by relying on the type name instead of its position.