Revert "Prevent segfault on malformed yaml with array keys"

This reverts commit 86c9a85626f7528e897d3871e703e4fe4452ae94. The fix provided
in that patch does prevent the PHP segfault bug, but it does so by violating
the YAML 1.1 specification (http://yaml.org/spec/1.1/#id933629).
Guard against crash caused by treating non-scalar event as scalar

Bug: 64694