queue: Fix duplicate entry issue when configured with sticky and multiple threads