Acquire the write lock before decrementing the prefix refcount.
Otherwise there's a window where another thread can take a reference to
the prefix before the write lock is acquired, and prelist_remove() will
end up invalidating a referenced prefix, which is probably bad.