Yes, if the entire point of this change is that we regressed on correct error reporting, then the tests should be written in a manner that we cannot regress in that way again. I believe the reason that this had been made a `DevError` is that it was a "stupid developer mistake" that the given name was not a string because the caller should have called this with the correct parameters. I think just changing to a ParseError doesn't sufficiently explain why this is more than a DevError.

In fact while writing that, I'm wondering if even changing this line of code is the right place for this. And looking over the code I don't see why this change was necessary. It looks like the change to scope isn't needed, but the change to `AST::Leaf` is, but that is untested.