Fix some predecessor edge cases when using the pythonic api