Move string-child conversion before uid-assignment

Setting UID's to branches should happen after the plain-string typed leaves are converted to objects. Otherwise the uid for those leaves is not set and Angular outputs the ngRepeat:dupes error.