Fix #2563 (fix the asserts in adjust_view_pos)

Thanks djanos