Release GIL in index_of()