StateServer: Add test for, and fix, object ID reuse.