Sanity checks for references/classifications (bug found by Bruce Wink)