Fix 9774

Dear colleagues,

I've faced with [#9774](https://dev.plone.org/ticket/9774). I fixed it. It works right now.
Could you please have a look?

Best regards,
Bogdan.