Fixed #6024 (False positive (nullPointer) using in 1.66)