E1S12: Fix long-standing offset-by-one bug with the final terrain mask