Added fix for Coverity bug 1147759. Possible reference
to out of scope variable. TRQ-2424