Fix node inclusion

Shouldn't this method also check that no two dependencies with different resource names have the same commonJS name?