[YAML] Parse mappings with keys containing # characters

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #11700
| License       | MIT
| Doc PR        | 
Alright. I guess we should also create a test case covering this. But honestly I can't think of an example that triggers this behaviour. I change it here, think about it and then open another pull request to change it in the ``Inline`` class.