[8.x] Add workaround for ISPN-4969

See https://issues.jboss.org/browse/ISPN-4969

Master fix is here:
https://github.com/wildfly/wildfly/pull/6939