Sort widgets by their position before initializing to ensure placeAt does not cause exception in case widget position is not in order.