Index: branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarEditorView.cs
===================================================================
--- branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarEditorView.cs	(revision 6403)
+++ branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionGrammarEditorView.cs	(revision 6409)
@@ -174,5 +174,5 @@
         foreach (var allowedChildNode in subtreeNode.Subtrees) {
           var visualLine = allowedChildSymbolsControl.GetVisualSymbolicExpressionTreeNodeConnection(subtreeNode, allowedChildNode);
-          visualLine.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
+          visualLine.DashStyle = System.Drawing.Drawing2D.DashStyle.Dot;
         }
       }
Index: branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/ProbabilisticTreeCreator.cs
===================================================================
--- branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/ProbabilisticTreeCreator.cs	(revision 6403)
+++ branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/ProbabilisticTreeCreator.cs	(revision 6409)
@@ -270,5 +270,5 @@
                                               where s.InitialFrequency > 0.0
                                               select node.Grammar.GetMaximumExpressionLength(s)).Max();
-        if (aggregatedLongestExpressionLength < targetLength) minArity = i + 1;
+        if (i > minArity && aggregatedLongestExpressionLength < targetLength) minArity = i + 1;
         else break;
       }
Index: branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbol.cs
===================================================================
--- branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbol.cs	(revision 6403)
+++ branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Interfaces/ISymbol.cs	(revision 6409)
@@ -21,4 +21,5 @@
 
 using System;
+using System.Collections.Generic;
 using HeuristicLab.Core;
 
@@ -33,4 +34,6 @@
     int MaximumArity { get; }
 
+    IEnumerable<ISymbol> Flatten();
+
     event EventHandler Changed;
   }
Index: branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionGrammarBase.cs
===================================================================
--- branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionGrammarBase.cs	(revision 6403)
+++ branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionGrammarBase.cs	(revision 6409)
@@ -131,10 +131,6 @@
     #region protected grammar manipulation methods
     protected void AddSymbol(ISymbol symbol) {
-      AddSymbolToDictionaries(symbol);
-      var groupSymbol = symbol as GroupSymbol;
-      if (groupSymbol != null) {
-        foreach (ISymbol s in groupSymbol.Flatten())
-          AddSymbolToDictionaries(s);
-      }
+      foreach (ISymbol s in symbol.Flatten())
+        AddSymbolToDictionaries(s);
 
       ClearCaches();
@@ -148,10 +144,6 @@
 
     protected void RemoveSymbol(ISymbol symbol) {
-      RemoveSymbolFromDictionaries(symbol);
-      var groupSymbol = symbol as GroupSymbol;
-      if (groupSymbol != null) {
-        foreach (ISymbol s in groupSymbol.Flatten())
-          RemoveSymbolFromDictionaries(s);
-      }
+      foreach (ISymbol s in symbol.Flatten())
+        RemoveSymbolFromDictionaries(s);
 
       foreach (GroupSymbol group in symbols.Values.OfType<GroupSymbol>())
@@ -188,20 +180,8 @@
 
     protected void AddAllowedChildSymbol(ISymbol parent, ISymbol child) {
-      List<ISymbol> parents;
-      List<ISymbol> childs;
       bool changed = false;
 
-      var parentGroup = parent as GroupSymbol;
-      if (parentGroup != null) parents = parentGroup.Flatten().Where(p => !(p is GroupSymbol)).ToList();
-      else parents = new List<ISymbol>() { parent };
-      var childGroup = child as GroupSymbol;
-      if (childGroup != null) childs = childGroup.Flatten().Where(c => !(c is GroupSymbol)).ToList();
-      else childs = new List<ISymbol>() { child };
-
-      foreach (ISymbol p in parents) {
-        foreach (ISymbol c in childs) {
-          changed |= AddAllowedChildSymbolToDictionaries(p, c);
-        }
-      }
+      foreach (ISymbol p in parent.Flatten().Where(p => !(p is GroupSymbol)))
+        changed |= AddAllowedChildSymbolToDictionaries(p, child);
 
       if (changed) {
@@ -229,20 +209,8 @@
 
     protected void AddAllowedChildSymbol(ISymbol parent, ISymbol child, int argumentIndex) {
-      List<ISymbol> parents;
-      List<ISymbol> childs;
       bool changed = false;
 
-      var parentGroup = parent as GroupSymbol;
-      if (parentGroup != null) parents = parentGroup.Flatten().Where(p => !(p is GroupSymbol)).ToList();
-      else parents = new List<ISymbol>() { parent };
-      var childGroup = child as GroupSymbol;
-      if (childGroup != null) childs = childGroup.Flatten().Where(c => !(c is GroupSymbol)).ToList();
-      else childs = new List<ISymbol>() { child };
-
-      foreach (ISymbol p in parents) {
-        foreach (ISymbol c in childs) {
-          changed |= AddAllowedChildSymbolToDictionaries(p, c, argumentIndex);
-        }
-      }
+      foreach (ISymbol p in parent.Flatten().Where(p => !(p is GroupSymbol)))
+        changed |= AddAllowedChildSymbolToDictionaries(p, child, argumentIndex);
 
       if (changed) {
@@ -255,6 +223,10 @@
     private bool AddAllowedChildSymbolToDictionaries(ISymbol parent, ISymbol child, int argumentIndex) {
       List<string> childSymbols;
-      if (allowedChildSymbols.TryGetValue(parent.Name, out childSymbols))
-        if (childSymbols.Contains(child.Name)) return false;
+      if (!allowedChildSymbols.TryGetValue(parent.Name, out childSymbols)) {
+        childSymbols = new List<string>();
+        allowedChildSymbols.Add(parent.Name, childSymbols);
+      }
+      if (childSymbols.Contains(child.Name)) return false;
+
 
       var key = Tuple.Create(parent.Name, argumentIndex);
@@ -263,4 +235,5 @@
         allowedChildSymbolsPerIndex.Add(key, childSymbols);
       }
+
       if (childSymbols.Contains(child.Name)) return false;
 
@@ -314,16 +287,10 @@
 
     protected void SetSubtreeCount(ISymbol symbol, int minimumSubtreeCount, int maximumSubtreeCount) {
-      var groupSymbol = symbol as GroupSymbol;
-      if (groupSymbol != null) {
-        var symbols = groupSymbol.Flatten().Where(s => !(s is GroupSymbol));
-        if (symbols.Any(s => s.MinimumArity > minimumSubtreeCount)) throw new ArgumentException("Invalid minimum subtree count " + minimumSubtreeCount + " for " + symbol);
-        if (symbols.Any(s => s.MaximumArity < maximumSubtreeCount)) throw new ArgumentException("Invalid minimum subtree count " + minimumSubtreeCount + " for " + symbol);
-        foreach (ISymbol s in symbols)
-          SetSubTreeCountInDictionaries(s, minimumSubtreeCount, maximumSubtreeCount);
-      } else {
-        if (symbol.MinimumArity > minimumSubtreeCount) throw new ArgumentException("Invalid minimum subtree count " + minimumSubtreeCount + " for " + symbol);
-        if (symbol.MaximumArity < maximumSubtreeCount) throw new ArgumentException("Invalid minimum subtree count " + minimumSubtreeCount + " for " + symbol);
-        SetSubTreeCountInDictionaries(symbol, minimumSubtreeCount, maximumSubtreeCount);
-      }
+      var symbols = symbol.Flatten().Where(s => !(s is GroupSymbol));
+      if (symbols.Any(s => s.MinimumArity > minimumSubtreeCount)) throw new ArgumentException("Invalid minimum subtree count " + minimumSubtreeCount + " for " + symbol);
+      if (symbols.Any(s => s.MaximumArity < maximumSubtreeCount)) throw new ArgumentException("Invalid minimum subtree count " + minimumSubtreeCount + " for " + symbol);
+
+      foreach (ISymbol s in symbols)
+        SetSubTreeCountInDictionaries(s, minimumSubtreeCount, maximumSubtreeCount);
 
       ClearCaches();
@@ -355,6 +322,8 @@
 
       List<string> temp;
-      if (allowedChildSymbols.TryGetValue(parent.Name, out temp))
-        return temp.Contains(child.Name);
+      if (allowedChildSymbols.TryGetValue(parent.Name, out temp)) {
+        if (temp.Contains(child.Name)) return true;
+        if (temp.SelectMany(s => GetSymbol(s).Flatten().Select(n => n.Name)).Contains(child.Name)) return true;
+      }
       return false;
     }
@@ -362,12 +331,12 @@
     public virtual bool IsAllowedChildSymbol(ISymbol parent, ISymbol child, int argumentIndex) {
       if (!child.Enabled) return false;
+      if (IsAllowedChildSymbol(parent, child)) return true;
 
       List<string> temp;
-      if (allowedChildSymbols.TryGetValue(parent.Name, out temp))
+      var key = Tuple.Create(parent.Name, argumentIndex);
+      if (allowedChildSymbolsPerIndex.TryGetValue(key, out temp)) {
         if (temp.Contains(child.Name)) return true;
-
-      var key = Tuple.Create(parent.Name, argumentIndex);
-      if (allowedChildSymbolsPerIndex.TryGetValue(key, out temp))
-        return temp.Contains(child.Name);
+        if (temp.SelectMany(s => GetSymbol(s).Flatten().Select(n => n.Name)).Contains(child.Name)) return true;
+      }
       return false;
     }
@@ -375,7 +344,8 @@
     public virtual IEnumerable<ISymbol> GetAllowedChildSymbols(ISymbol parent) {
       List<string> childs;
-      if (allowedChildSymbols.TryGetValue(parent.Name, out childs))
-        return childs.Select(s => GetSymbol(s)).Where(s => s.Enabled);
-      return Enumerable.Empty<ISymbol>();
+      if (!allowedChildSymbols.TryGetValue(parent.Name, out childs))
+        return Enumerable.Empty<ISymbol>();
+
+      return childs.Select(x => GetSymbol(x)).Where(s => s.Enabled);
     }
 
@@ -452,5 +422,4 @@
     }
 
-
     #region events
     private void RegisterSymbolEvents(ISymbol symbol) {
Index: branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeGrammar.cs
===================================================================
--- branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeGrammar.cs	(revision 6403)
+++ branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeGrammar.cs	(revision 6409)
@@ -81,8 +81,10 @@
     }
     public override IEnumerable<ISymbol> GetAllowedChildSymbols(ISymbol parent) {
-      return grammar.GetAllowedChildSymbols(parent).Union(base.GetAllowedChildSymbols(parent));
+      var symbols = grammar.GetAllowedChildSymbols(parent).Union(base.GetAllowedChildSymbols(parent));
+      return symbols.SelectMany(s => s.Flatten()).Where(s => s.Enabled && !(s is GroupSymbol));
     }
     public override IEnumerable<ISymbol> GetAllowedChildSymbols(ISymbol parent, int argumentIndex) {
-      return grammar.GetAllowedChildSymbols(parent, argumentIndex).Union(base.GetAllowedChildSymbols(parent, argumentIndex));
+      var symbols = grammar.GetAllowedChildSymbols(parent, argumentIndex).Union(base.GetAllowedChildSymbols(parent, argumentIndex));
+      return symbols.SelectMany(s => s.Flatten()).Where(s => s.Enabled && !(s is GroupSymbol));
     }
 
Index: branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/GroupSymbol.cs
===================================================================
--- branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/GroupSymbol.cs	(revision 6403)
+++ branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/GroupSymbol.cs	(revision 6409)
@@ -27,4 +27,5 @@
 
 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  [StorableClass]
   public sealed class GroupSymbol : Symbol {
     private const int minimumArity = 0;
@@ -45,4 +46,5 @@
     public IEnumerable<ISymbol> Symbols {
       get { return symbols; }
+      private set { symbols = new ObservableSet<ISymbol>(value); }
     }
 
@@ -75,6 +77,6 @@
     }
 
-    public IEnumerable<ISymbol> Flatten() {
-      return symbols.Union(symbols.OfType<GroupSymbol>().SelectMany(g => g.Flatten()));
+    public override IEnumerable<ISymbol> Flatten() {
+      return base.Flatten().Union(symbols.SelectMany(s => s.Flatten()));
     }
   }
Index: branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/Symbol.cs
===================================================================
--- branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/Symbol.cs	(revision 6403)
+++ branches/GP.Grammar.Editor/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Symbols/Symbol.cs	(revision 6409)
@@ -21,4 +21,5 @@
 
 using System;
+using System.Collections.Generic;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -96,9 +97,17 @@
     [StorableHook(HookType.AfterDeserialization)]
     private void AfterDeserialization() {
-      if (initialFrequency.IsAlmost(0.0)) enabled = false;
+      // BackwardsCompatibility3.3
+      #region Backwards compatible code, remove with 3.4
+      if (initialFrequency.IsAlmost(0.0) && !(this is GroupSymbol)) enabled = false;
+      #endregion
+
     }
 
     public virtual ISymbolicExpressionTreeNode CreateTreeNode() {
       return new SymbolicExpressionTreeNode(this);
+    }
+
+    public virtual IEnumerable<ISymbol> Flatten() {
+      return new List<ISymbol>() { this };
     }
 
Index: branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeInterpreter.cs
===================================================================
--- branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeInterpreter.cs	(revision 6403)
+++ branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeInterpreter.cs	(revision 6409)
@@ -24,8 +24,8 @@
 using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Data;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
 
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
