Backport two fixes from V2 into V1.


git-svn-id: https://svn.apache.org/repos/asf/xmlbeans/branches/1.x@407918 13f79535-47bb-0310-9956-ffa450edef68
2 files changed