This was mainly a matter of deferring the wrapping of the button's children until after its internal layout tree has been constructed. That way we don't lose any pseudo elements spawned along the way. Fixes #2397. Fixes #2399.