LPS-40917

This fixes one half of the problem. I removed the other half (which I originally hacked in the previous commit) so Alex/Sergio can hopefully provide a proper fix to the problem of deleting files from staged to published sites.