Don't queue invalid anonymous objects during load.
Added associated test.