queue2: handle overwriting the current range correctly