Locked layer draw order - display bug?

Hi!
I encountered the wrong appearance of locked objects (in a locked layer) - draw order. I would like to all locked objects appear behind not locked layers/objects. I am working a lot with more sublayers, could it be related? Or is it rather display bug? See attached pictures.