Fix crash when a member function is called via callMemberFunction() and that function raises an exception.
Found in comment on StackOverFlow. Fix memory size allocated for new objects. It used the wrong size calculation, but was big enough to avoid problems.