Fixed looping references

- Refs weren't being saved as references in the basic case.
- Internally, refs which are operational have been changed to use
>><<ref.reg>><< after they have been linked