This is because I felt the incessant `$tableClass != $baseClass` comparison done multiple times was repetitive, and only needed to be done once. If the issue is the variable could be named better (`$includeTable`?) then maybe it would make more sense in this context.

I agree with you on the second point; Will have a go at a rewrite. Whatever requires the least code wins my vote honestly.