External/raw identifier references should not keep ID_INHERITED since the
identifier references are always local. They ought otoh be flagged ID_INLINE
since they are always statically bound.
Identifier overriding fixes; use the same algorithm when constants are
overridden as for functions. Also added some more debug helpers.