jar: finally fix the TAILQ corruption

Turns out the prev pointer is a bad pointer to ride as it is
embedded into the element that might already be gone, so instead
flip the queue usage on the inside: the next pointer is a direct
pointer and thus always valid.