Fix #950: Re-create cached files if target was deleted