Fix include trace

I couldn't figure out how to properly test this (there's an abortive commit trying to set something up for Mocha) so I'm not sure if this actually works, but here's my crack at trying to fix #351.