Improve treatment of Fortran's "class is"