Fix bug in bundling when files are missing.

Fixes bug introduced in #652