This fixes a bug in commit https://android-git.corp.google.com/g/#change,52518. Updated index to be zero based when passed around and off by one error on resume. Note that previous commit changes how DumpRenderTree dumps titles. This might affect the results of layout tests. Change-Id: I3d6989d71c336f90168e38c994dd36743bda365c