This reverts commit 3d6bd6a1fa. The problem wasn't fortran-specific and should be fixed now. See #9212.
3d6bd6a1fa