SPARK-1019: pyspark RDD take() throws an NPE