Fix for EZP-22322: Content versions returns HTTP 500 when internal draft exists.

Same pull request at eZ Systems: https://github.com/ezsystems/ezpublish-kernel/pull/721

Will probably not be merged there for a good while.

Jira: https://jira.ez.no/browse/EZP-22322