Reset RefNum when copying an object (Fixes #1723)