its not exactly how it works. queue(new Container("c1")) will not be immediately executed, none of them will. unqueueing happens after/before? the initialization of the component when the markup is available.
when dequeuing we try to find a queued child closest to the container, so in the example above it will work like this:
resolving c1, found and dequeued
resolving c1->input. look in c1, not found. look in parent, found and dequeued
resolving c2. look in c1, not found. look in parent, found and dequeued
resolving c2->input: look in c2, found and dequeued
also i now think queue is too cumberson to type, we should probably rename it to "push"