Fixes use of self within with clauses