Issue 4791 folder with bad legacy file fails to delete