Improved YAML parsing

This seems to work. 8e795b5 will be removed and a246d26 will be modified to use the forthcoming YAML modifications. c3c8791 will also need a closer look. I'm not convinced that regex is exhaustive.
Well, I'd rather not bother with re-adding the warning since I don't think it is useful to the user to care one way or the other if they both work. Recording the name for error reporting is good though, I just don't follow how that works since node only has the one name attribute. But if you say that the original name is recorded elsewhere I'll believe you :)