Fix for bug 2965 Typechecking should be included as extra defense line. Furthermore, we need to remove reference counts during error handling. (transplanted from fa4034576f02bf1a1aa3a755852b021d8da1540b)
Fix for bug 2965
Typechecking should be included as extra defense line.
Furthermore, we need to remove reference counts during
error handling.
(transplanted from fa4034576f02bf1a1aa3a755852b021d8da1540b)

zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb