Mark when end of scope is reached.