Raise reference error

Issue was raised by Nathan's case with intra-repository references in batches.