STS-3478: added extra guard to prevent closed or deleted file from being accessed
Merge branch 'master' into d3-editor