Issue #3040746 by Berdir, amateescu, Sam152: Update functions that set owner entity key updates can fail on existing data with NULL values