C API bugfix (Stackoverflow #22864146)

Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
Merge branch 'unstable' of https://git01.codeplex.com/z3 into unstable