Sec 2656

This is my fix for https://jira.spring.io/browse/SEC-2656.
The issue is fixed and a unit test is created.