Prefixes which match the start of the value will have their ids inserted
at the front of the list. This means that results tend to come ordered
as users are more likely to expect.

The root lock sucks though. Rather than relying on append() which could have
been an O(1) write (if there cap < len), we now always create the array. Time
to consider a per-node lock and a modifying lock too.