remove loop in generateSingleValueInExpr
fix for 1355/1359; remove unused baseSegment
unused imports