Is the `if subclass` clause really necessary? Under what circumstances would we get empty subclasses here, and couldn't that be handled in `_get_subclasses_recurse` instead?

This clause seems like a case of this method having a side effect (eliminating falsy subclasses) that is not clearly advertised by its name or docstring.