Looks like there's another bug here (not introduced by this PR):  if `tuple` is `NULL` here (because the `PyTuple_New` call failed), it looks as though we return the incoming value.  We should return `NULL` instead in that case.