Fixes #9518 - "file state=directory" silently skips if it's currently a file