Prevent replacing open fragment with self.