Add support for adding bundles to pre-existing documents