Fixes "save new record, when duplicating" issue, where it would show old record after saving. Fixes #840.