Fixed #10811 -- Assigning unsaved objects to FK, O2O and GFK raises ValueError.