Nice catch. We should scrub the code to see if there are any other places we construct a RegExp from an unknown string in this fashion, as there's lots of potential for error in doing that.

In this case, though, it's not clear to me why we need a regexp in the first place. This regexp just seems to be trying to check if `module.uri` starts with the given path, so couldn't this just be `if (module.uri.indexOf(path) === 0)`? (It seems like that would be more accurate anyway, since things like periods in the path would get interpreted as regexp metacharacters, which presumably we don't want.)