Issue #16076: check for return value of PyTuple_New for args (following
Coverity report) and cleanup code.