Fix NoSuchElementException in Wildfly 8.0.0.Final