title: Element does not retain its Storyboard accessibility identifier or type in runtime
body: <p>I have an automated UI test to make sure a page displays the correct elements by searching for them using XCUIElement queries like so</p>
  
  <pre><code>let instructionLabelID = "UIA_HelpViewController_InstructionLabel"
  let callViewID = "UIA_HelpViewController_CallTextView"
  
  var instructionLabel: XCUIElement { return app.staticTexts[instructionLabelID] }
  var instructions: String { return instructionLabel.label }
  
  var callLabel: XCUIElement { return app.textViews[callViewID] }
  var callText: String { return callLabel.value as! String }
  </code></pre>
  
  <p>Here is the corresponding storyboard</p>
  
  <p><a href="https://i.stack.imgur.com/t3hXO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/t3hXO.png" alt="storyboard"></a></p>
  
  <p>The test fails due to the highlighted view not being found, even though we can see its identifier is correct in the storyboard. With a breakpoint I can check all the elements during runtime, and here is the result</p>
  
  <p><a href="https://i.stack.imgur.com/kZO7y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kZO7y.png" alt="bp"></a></p>
  
  <p>As we can see, the first element is correct in that it is under an Other (its container view), has type StaticText, and has its identifier. The second element however seems to be merged into its container rather than being a child of it. Both containers have the Accessibility Enabled option unchecked. How can I fix this?</p>