Make sure kernel is in the compile scope.