In EtBaseClass::cast, only pass $client into the new class if it accepts parameters. This fixes a bug that occurred when trying to cast objects that don't have an explicit constructor with a $client parameter (in my case it was DataExtensionField).