SPARK-738: Spark should detect and squash nonserializable exceptions