fix bit_index and inverted_index erase rows locally

Fix for #659