Fix for SPR-12447

 https://jira.spring.io/browse/SPR-12447