Invalid anonymous objects can have NULL pointers.
Added associated tests.
Add a reference when accessing preloaded anonymous objects.
Added associated tests.