XSD: Handle element flattening different at toplevel and in nested cases.