Fix crash when finding traps.