Require definitions of classes when checking for derivation (ROOT-5315).