Is there a way to restrict extension methods in DSLs?

Say I have a class structure like this:

```
class Outer {
    fun middle(op: Middle.() -> Unit): Middle {
        val middle = Middle()
        middle.op()
        return middle
    }
}

class Middle {
    fun inner(op: Inner.() -> Unit): Inner {
        val inner = Inner()
        inner.op()
        return inner
    }
}

class Inner

fun outer(op: Outer.() -> Unit): Outer {
    val outer = Outer()
    outer.op()
    return outer
}

```

I can then create a call like so:

```
outer {
    middle {
        inner {
            middle { }  // Here is the problem
        }
    }
}

```

My problem is that the marked `middle { }` call is confusing, as it adds a `Middle` to the `Outer` when it looks like it is adding to the `Inner`.

Is there a way to not allow the `middle { }` call?