REVIEW-3395: use natural ordering of tasks; move getDeclaredType() to DslObject