Transfer pbauer's fix of v. 2.4.6

Moved https://github.com/plone/plone.app.portlets/commit/25fb987f3442032f5d95231e6a329d262c2c9532 to master-branch.