fix: #3582074 AssertionError: Cannot load the "key" entity with NULL ID

(cherry picked from commit 20c8ac18)

Closes #3582074

Merge request reports

Loading