References can have length if the element they reference allows lengths
Improve error message