[SPARK-4974]: Prevent Circular dependency.