Set up a correct filename for resources from a bundle
Before this commit, bundle loaders would set up an incorrect filename to the resource. This commit fixes that by setting up a correct filename.