Only check if we are out of bounds if the object we are searching for has a known id (0 also means not known)

Found by Michael Vrable
1 file changed