[build] Fix making bundles

make sure we don't include a subfile twice, even if it's required by
different components of a bundle.
Fix source map root and account for the added (c) text.