Fortran: Restore support for parsing "end interface X"
!7529 (merged) accidentally dropped support for parsing end interface X, causing all subsequent modules to be
seen as an interface. Fix this and add a test case to detect this situation.
Fixes: #24203 (closed)
Backport: release
Edited by Brad King