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