Currently the REST endpoint is in charge of rewriting the search result sets prior to delivery. But the episode service has some direct clients like the EpisodePermissionUpdateEventHandler which then gets mediapackages with "unstable", i.e. non-rewritten URLs.
In order to change this the EpisodeService's API has to be modified so that all methods returning mediapackages take a UriRewriter as argument.
The issue was discovered because of the lately fixed clean-up operation. Un-rewritten mediapackage URLs were pointing to the working file repository but since clean-up did not work properly the referenced files were still available.
Use a workflow with the clean-up operation at the very end
Ingest an episode with a series associated
Edit the series in the Series tab, change its name
The EpisodePermissionUpdateEventHandler uses the EpisodeService to find all episodes belonging to the modified series. Later on you'll get "could not copy" exceptions.