Fix for https://jira.springsource.org/browse/SECOAUTH-399