Fix for issue #5587 where app is bootstrapped more than once

PR for #5587

I am not sure where to write the test for this fix (may be `e2e` with html file loading build/angular.js?) . 

Here is a plunkr showing that the fix works - http://plnkr.co/edit/xey09HDiX5jQmHKbgEVi?p=preview