More tests for overriding injections, and a bug fix