Conditional expectation of the duration of the classical gambler problem with defects