Fix various bugs in injector and redirector, make them more robust and enable building them by default