Fix references to anonymous classes

References to an anonymous class are counted as references to its
declaring class. Fixes #33.