Make class injection behaviour more sane