Issue #161: Ensure we don't leak handles from Python