I've recreated the issue in the linked file. in 'comp 1' the book comp will not move between the solids regardless of its z-position. It always visually stays between the two objects it is between in the timeline.
In comp 2, the book moves in front of and behind the solid layers as you would expect and does not matter what layer number it is in the timeline.
I'm sure there is a logical explanation for this... I just can't seem to find it.