Added the fix suggested into https://dev.plone.org/ticket/2988#comment:11