Mapgen V6: Add flag to stop mud flow
Fix some errors reported by clang static analyzer.