Wrong module was searched for extra exports

I had the problem that my mocha script was not able to find an extra export I made in one of my modules.

"""
var myModule = require(./my-module)
var test = require-from('testExports','./my-module')
"""

The variable "test" was undefined because the require-from module was searched for the "my-module" child module instead of the parent mocha module.

This is my first dance with the module system so I am not sure how this fix will behave with respect to module caching etc.