Take 3 of WFLY-266

Don't merge this until the testsuite passes