Handle anonymous inner classes better in per-class coverage check.

Bugs closed: AURORA-822

Reviewed at https://reviews.apache.org/r/26574/