Refactor '_inject' to work as a transaction. If any css/html/js injection fails (due to an IndexError) don't inject any markup and raise custom InjectionException.