Fix for intermittent failures, see https://issues.apache.org/jira/browse/AMQ-5053