Wrestling with getdent
Finally located the bug in do_getdent.