Fixed an infinite relayout loop is someone insert a stylesheet during relayout

The relayout triggered stylesheet added, which triggered a relayout.
Now, I make sure not to enter into any kind of loop.