appium/appium — pull request #1895 by bigfei (2014-02-11 09:07:48+00:00)
Title: The latest Window should be the last one of getWindowHandles() returns

Obviously, res.value[0] !== res.value[res.value.length - 1].
According to context, the latest window handle should be the last one element in the res.value array.