We need to make sure that the selected layout entity exists because it might be pointing to a null reference
merged