Capture avoiding substitution during skolemization