diff --git a/meta/classes-recipe/go-mod-update-modules.bbclass b/meta/classes-recipe/go-mod-update-modules.bbclass
index 3a0f0a3377..bae9e47c0d 100644
--- a/meta/classes-recipe/go-mod-update-modules.bbclass
+++ b/meta/classes-recipe/go-mod-update-modules.bbclass
@@ -10,7 +10,12 @@ do_update_modules[network] = "1"
 # -licenses.inc will append LICENSE and LIC_FILES_CHKSUM with the found licenses
 # in the modules.
 #
-# These files are machine-generated and should not be modified.
+# These files are machine-generated and should not be modified. They are
+# included here so that a new recipe parses before they have been generated
+# by the first run of the update-modules task.
+
+include ${FILE_DIRNAME}/${BPN}-licenses.inc
+include ${FILE_DIRNAME}/${BPN}-go-mods.inc
 
 python do_update_modules() {
     import subprocess, tempfile, json, re, urllib.parse
