Add test and fix amf3 object parse algorithm.