Gulp gulp-angular-filesort plugin not working with ionic

I’d like to inject the bower dependencies in my index.html by using gulp-inject, main-bower-files and gulp-angular-filesort. It seems that the gulp-angular-filesort does not manage to build the tree dependency correctly.

bower.json

{
  "name": "HelloIonic",
  "private": "true",
  "devDependencies": {
    "ionic": "driftyco/ionic-bower#1.0.0-beta.14"
  },
  "dependencies": {
    "ngCordova": "~0.1.12-alpha",
    "restangular": "https://github.com/mgonto/restangular.git#84882b5e8e7be047a013e43d9a36e34946c6c2db",
    "angular-local-storage": "~0.1.5",
    "ionic": "driftyco/ionic-bower#v1.0.0-beta.14",
    "ionicons": "~2.0.1"
  }
}

gulpfile.js
The build/vendor folders contains all js files detected by main-bower-files plugin.

gulp.src('./src/index.html')
		.pipe(inject(gulp.src(['./build/vendor/**/*.js']).pipe(angularFilesort()).pipe(print()), {
			name: 'bower',
			relative: false,
			ignorePath: '/build',
			addRootSlash: false
		}))

Running the task I get that order:

[15:17:35] Starting 'vendor'...
[gulp] build/vendor/restangular.js
[gulp] build/vendor/ng-cordova.js
[gulp] build/vendor/lodash.compat.js
[gulp] build/vendor/ionic.js
[gulp] build/vendor/ionic-angular.js
[gulp] build/vendor/angular.js
[gulp] build/vendor/angular-ui-router.js
[gulp] build/vendor/angular-sanitize.js
[gulp] build/vendor/angular-local-storage.js
[gulp] build/vendor/angular-animate.js

which is reflected then in the index.html, and makes the ionic app missing some dependencies.