Added more intelligent mixin inject logic.