Add flag to set the layout-id after applying the updates.

Add a flag to set the layout id to the last update id.