Override replaceAppl to recheck invariant of typesmart constrcutor.