"Element does not exist in cache" for isDisplayed Method

I am attempting to determine if an element is visible in mobile Safari. When executing the following code in debug mode in Eclipse everything works fine but when I do a full run it fails with the error “Element does not exist in cache” on the .isDisplayed call.

Can’t determine why it’s failing or why it works fine in debug mode. I have attempted other methods of detecting the presence of the element (even though this one works as proven by the line that’s commented out) and I’ve also attempted to put arbitrary waits in various places with no success (not that it should matter because the first line should wait until the element exists before proceeding anyway).

WebElement element = (new WebDriverWait(wd, timeout))
//element.getAttribute("innerHTML") returns the expected text so I know the element has been found and is present.
boolean elementVisible;
elementVisible = element.isDisplayed();

Here is the relevant piece of the server log showing the error…

2016-06-06 16:27:45:490 - [HTTP] → GET /wd/hub/session/3bed1ab4-c4a9-4c71-b74a-3f5600c67330/element/5007/displayed {}
2016-06-06 16:27:45:492 - [MJSONWP] Calling AppiumDriver.elementDisplayed() with args: [“5007”,“3bed1ab4-c4a9-4c71-b74a-3f5600c67330”]
2016-06-06 16:27:45:494 - [debug] [iOS] Executing iOS command ‘elementDisplayed’

2016-06-06 16:27:45:495 - [debug] [RemoteDebugger] Executing ‘is_displayed’ atom in default context
2016-06-06 16:27:45:495 - [debug] [RemoteDebugger] Sending javascript command (function(){return function…
2016-06-06 16:27:45:496 - [debug] [RemoteDebugger] Sending ‘_rpc_forwardSocketData:’ message to remote debugger
2016-06-06 16:27:45:513 - [debug] [RemoteDebugger] Received applicationSentData response
2016-06-06 16:27:45:513 - [debug] [RemoteDebugger] Found data handler for response
2016-06-06 16:27:45:513 - [debug] [RemoteDebugger] Received data response from socket send: ‘"{"status":10,"value":{…’
2016-06-06 16:27:45:514 - [debug] [RemoteDebugger] Original command: sendJSCommand
2016-06-06 16:27:45:515 - [debug] [iOS] Error received while executing atom: Element does not exist in cache (status: 10)

I tried to run the same test against Appium 1.4.13 but the following lines just loop in the server log endlessly after the simulator comes up and it never launches mobile Safari.

2016-06-07 09:16:42:457 - info: [debug] We launched the simulator but the required dirs don’t yet exist. Waiting some more…

2016-06-07 09:16:43:157 - info: [debug] Checking condition to see if we should kill instruments

Don’t know if it’s a legit bug but submitted the following…