fix the infinite loop in tf importer of 3.4 branch
fix the infinite loop in tf importer of 3.4 branch

opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv