Revert "https://issues.jboss.org/browse/JBTM-1511"

This reverts commit 589565f0f57c1a583c92fb3b874218ae8bae53b0.
Revert "Revert "https://issues.jboss.org/browse/JBTM-1511""

This reverts commit 3645c351c0bf92af2a5f7549576558906991ceea.
https://issues.jboss.org/browse/JBTM-1511

Added configuration option to enable/disable the optimsation. QA
disables it so existing tests can run.