Fatal Error C1031

compiler limit : function calls nested too deeply

The program exceeded the dynamic compiler limit on nested function calls.

Split the nested calls, saving the return value from one of the nested functions in a temporary variable.