system: make loadReference give more informative error if ref not loaded