Copy of https://issues.jboss.org/browse/HORNETQ-1578
PR: https://github.com/hornetq/hornetq/pull/2135
Regression tests passed Verified with EAP 6.4.22.CP.CR1