stash: refresh the index before deciding if the work tree is dirty