Index out of bounds in wilderness_level()