check-require: fix submod-related bugs