Fortran: Fixes for pointer function call as variable (PR96896)