Improved handling of max size in gameplay::Stage.

Cheery-picked from master.

Conflicts:
	src/gameplay/stage.cpp