When determineing the kind according to the type of the scope, set the kind to scope only if the scope type is module