Fix to conditional bundling of gems