Handle static variables in FileStat better