patch 8.1.0315: helpgrep with language doesn't work properly

Problem:    Helpgrep with language doesn't work properly. (Takuya Fujiwara)
Solution:   Check for the language earlier. (Hirohito Higashi)
diff --git a/src/testdir/test_quickfix.vim b/src/testdir/test_quickfix.vim
index 8a175a1..6063fd6 100644
--- a/src/testdir/test_quickfix.vim
+++ b/src/testdir/test_quickfix.vim
@@ -3091,6 +3091,20 @@
   call Xqftick_tests('l')
 endfunc
 
+" Test helpgrep with lang specifier
+func Xtest_helpgrep_with_lang_specifier(cchar)
+  call s:setup_commands(a:cchar)
+  Xhelpgrep Vim@en
+  call assert_equal('help', &filetype)
+  call assert_notequal(0, g:Xgetlist({'nr' : '$'}).nr)
+  new | only
+endfunc
+
+func Test_helpgrep_with_lang_specifier()
+  call Xtest_helpgrep_with_lang_specifier('c')
+  call Xtest_helpgrep_with_lang_specifier('l')
+endfunc
+
 " The following test used to crash Vim.
 " Open the location list window and close the regular window associated with
 " the location list. When the garbage collection runs now, it incorrectly