Use internal flag to determine whether to persist generated proxy classes.