In the YAML 1.2 specification it is stated that "mapping - an unordered association of unique keys to values" (emphasis mine). Your keys are not unique and what happens because of that depends on the library implementation (throw an error, ignore one of the keys).
What your parser obviously does is throw away the first key/value pair. What you want to do cannot be done by loading the first example using a YAML parser. You can of course write a utility that splits up the text that is not using the YAML parser.
Please note that in YAML 1.1:
It is an error for two equal keys to appear in the same mapping node. In such a case the YAML processor may continue, ignoring the second key: value pair and issuing an appropriate warning.
This is e.g. not how the YAML 1.1 parser PyYAML works: it doesn't ignore the value for the second (or following) key, nor does it issue a warning.