Some more progress. Still segfaulting in Python though, presumably because I'm
missing an INCREF somewhere...