Dump request can call definition on protocol error if debug is enabled to get a better view on what is missmatch.
Check that $self really exists in some places and plug a memory leak, ->destroy removed the ref so it did not delete it from the hash.