Fixed use of a deprecated attribute for a dynamically created layout.