Improvements and bugfixes in core-per-store.
Found a bug causing far too many documents being added to the index.