[WIP] Fix invalid_fmode test