Indexing queue fixes

Fixes a few issues around adding metadata records to spatial search.