Refs #18417. Also fixed some test case classes which subclassed the wrong parent. Backport of a5d47415f from master.