[python-meh] Various bug-fixing patches