Merge "Fix IndexOutOfBoundsException in grid span lookup" into tm-qpr-dev