[mongo] Fix ensure_index