That's correct. He does get charged with the runs, of course.
It's one more reason why ERA isn't totally reliable.
Just think if the error that was charged was a bad call by the scorer, that it should have been a hit.
That would mean Cashner was let off the hook for what should have been 7 more earned runs.