It does not check if the resulting cursor is_valid(), requiring callers to do it, which is a foot gun. Instead, it should check resulting_cursor.is_valid() and return either None or Some. We will also need to fix callers.
I can mentor anyone who wants to pick up this bug.