Use OF_INVALID_INDEX instead of SIZE_MAX.