Fixed issue related to expression simplification, which would make the diagram viewer crash whenever an expression contained variable names with parenthesis