FC-1153 Avoid recursion, decrease memory usage.