Created a test simulating the usecase described in https://dev.plone.org/ticket/13462
A fix for the problem described in https://dev.plone.org/ticket/13462