Corrections to the closure approximation for the pion-nucleon T-matrix inside the nucleus