Stop messages from being emitted out of order when detaching.