Some tuning for MinGW 4.8 build
Handle some unhandled exceptions in index search