refactor(Injector.get): instance setting needed to be dry

Some code was noted by a comment to be dry'd up. Refactored the code into
local function with all dependencies passed in as arguments.