Ported Jean-Frederic's Fix for MODCLUSTER-372 from master to 1.2.x branch

See [MODCLUSTER-372](https://issues.jboss.org/browse/MODCLUSTER-372) for performance analysis details.