charm: implement MustParseReference

We had far too many duplicated implementations of this...