see comment in https://issues.jboss.org/browse/RAILO-2386