An object's ID is not copied

Fixes JRUBY-7136

Signed-off-by: Wayne Meissner <wmeissner@gmail.com>