Merge pull request #12740 from k-takata/import-9.0.1678

Bring Bram's last patch (9.0.1678) to GitHub