XCUITest xpath will only work when the full xpath is given and other xpath problems

I am using:
Mac os: 10.12
[Appium] deviceName: ‘iPhone 6’
[Appium] fullReset: true
[Appium] launchTimeout: 90000
[Appium] platform: ‘MAC’
[Appium] showIOSLog: true
[Appium] nativeInstrumentsLib: true
[Appium] newCommandTimeout: 600
[Appium] platformVersion: ‘10.0’
[Appium] automationName: ‘XCUITest’
[Appium] sendKeysStrategy: ‘grouped’
[Appium] browserName: ‘’
[Appium] platformName: ‘iOS’

When I go to select an element I need to provide the full xpath or the wrong element will be selected.
For example if I have the xpath of:
//XCUIElementTypeApplication[1]/XCUIElementTypeWindow[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeOther[1]/XCUIElementTypeTable[1]/XCUIElementTypeCell[8]
The correct element will be selected

If I use:
//XCUIElementTypeTable[1]/XCUIElementTypeCell[8]
The wrong element will be selected, there isn’t any other XCUIElementTypeCell[8].

On a different element if I use:
//*[contains(@name,“Environment”)]
An element that doesn’t have “Environment” will be selected.
(This works with the old method)

If I use //XCUIElementTypeCell[contains(@name,“Environment”)] a different wrong element will be selected.

Am I missing something so I don’t have to use the full xpath?