[bugfix] Python: Actually erase all IMs on clear(). Fixes #3.