isImpassable more efficient and robust, isOutOfBounds added