ZF-6393: Wrong AMF0_AMF3 reference counting
If there is more than one body part in a mixed AMF0/AMF3 message, and there are complex parameters (Anonymous and Typed objects) used, The requests will fail. The reason is, that the AMF3 protocol restarts reference counting when it switches from AMF0 to AMF3 mode, but the current AMF0 deserializer reuses the last used AMF3 deserializer, and therefore doesn't restart reference counting.
This bug is also the reason for bug ZF-5049/5382
I attached a patch which fixes the problem.