fix for core invenio bundles

This is adaptation from invenio side to PR https://github.com/inveniosoftware/invenio/pull/1983