Reorganizing BtreeIndex to avoid MSVC troubles