SP-1320 - Backport of MONDRIAN-1061 - java.lang.StackOverflowError resulting from recursive calculated member usage within virtual cube (5.1) 

see https://github.com/pentaho/mondrian/pull/351