Removed redundant cast when creating a class replicas for final system classes