Fixed race condition which produced duplicate queue entries, yielding double frees