We were leaking the element refcount and not the pad one.
MIDI spec http://www.borg.com/~jglatt/tech/midifile.htm