I think this should throw an Exception if the def is null, since here we have a case that someone is trying to use that module in a way that does not match its type (we know that because of the positional relationship to the named channel). Otherwise, this null return will cause the calling method to continue, trying to find a module of any type that matches the name... we don't want that to happen. I would think that a test for something like this would show that as a problem:  ":foo > somesourcemodulewherenosinkhasthesamename"