Prevent from trying to delete an empty directory when moving out a file

Moving a file outside a folder by a rename operation prevent tfs to
delete the containing directory with the error :
"TF14060: The item $/MyProject/Solution/FolderToDelete cannot be deleted. One or more children have pending changes."
The folder should not be deleted (and leave orphaned in tfs) if it is emptied
and that one of the previous contained files was renamed...