if a Reference has been resolved, it returns the referee's id now instead of the stored name; this makes it robust for mangling
add simple name mangling