When determineing the kind according to the type of the scope, set the k...

...ind to scope only if the scope type is module