Fix FORTRAN code function scope test