Fix shoddy work I did in 7354d9f4 when I broke references

* I will work on adding testing for refs and references next.

Change-Id: Ib9be770d70587cd36ecad4df8067e646eac6d750