Can't use the `last` statement in do-while block