It didn't help, although the last two primaries before that were close and the Republican only lost by 2 or 3 points. This time Kobach lost by 11.
Republicans lose because the moderate and conservative wings of the party trash each other in the primary, leaving Moore rested and flush with cash for the general election. In this election Kobach ran farther to the right than any other candidate has done, believing that the conservative base would carry him to victory. He apparently badly overestimated the size of his base. He alienated conservative Democrats, independents, and moderate Republicans who all went for Moore in droves.