fixes ZEN-13108, avoid mutating local variable when callin InspectContai...

...ner because it can set out local variable to nil when an error ocurrs