Edit to avoid race condition when adding indexes to Shock node mongo doc...

...uments.