Reimplement insert_before to avoid the need to store bidirectional indexes