Added different locking technique when SpriteSortMode is Immediate.