1. Run GetTakeEnvelopeByName ("Volume") on an item with no envelopes. Returns nil
2. Run action 40693 -- Take: Toggle take volume envelope
3. Now GetTakeEnvelopeByName ("Volume") returns correctly the userdata.
4. Run again 40693 (it has now removed the envelope)
5. Now GetTakeEnvelopeByName ("Volume") returns userdata of a non-existing envelope instead of nil!
Licecap demonstrating the misbehaviour: