recorderendpoint: Do not deadlock if element is released from its own thread

Change-Id: Ibd7bfa867f675c75f35c1337f20e6b3427ed99bd