I had forgotten the absolute value. Oops. This statement used to always return false when the ghost in question was on the left side of the map. Also, now works, then throws AIOOBE. Have not investigated cause yet.