https://issues.apache.org/jira/browse/AMQ-3516 Add fix along with a unit test to ensure it stays fixed.