[SPARK-2483][SQL] Fix parsing of repeated, nested data access.