Fixed rare priority inversion bug in MSPriorityQueue