Automatically assign an id to the containing Element if one hasn't been
set.