We do a similar thing here: https://github.com/mozilla/addon-sdk/blob/master/lib/sdk/event/utils.js#L31-L34 and few more places now...
I have a feeling we'll need to implement some API to define refs between diff objects.