Fix the bug causing a corner to be ignored during terrain check. Some of the Lua functionality had me badly fooled.