Fixes #5193
Merge pull request #5333 from mwerezak/storage-close-on-move

Fixes #5193