Refactor #3370: adjust container size more properly