I was able to replicate exact same issue in my environment if the CTE name & name of table is same, so I do not see any reason that it will not work.
Are you getting same error or some other error?
Your code is not working because you have selected only 3 columns in CTE but while inserting you are also asking for Class, Date_Entered, PMmiles which CTE does not have.