Fix EZP-20509: Cache issues when creating content

JIRA issue: https://jira.ez.no/browse/EZP-20509

See https://github.com/ezsystems/ezpublish-kernel/pull/266 for details