TEIID-3143 fixing class cast on clone