When there is an `end interface X` in a file, subsequent modules should not be considered part of interface X. Issue: #24203