Fixes flag-file statting