Add assertion message.
Surround by try-finally to eventually reset flag properly.