fix the check-stageN-doc-$doc targets, close #5661