bug/twist in depth replacement condition?

I think the replacement condition is twisted.