The command isn’t parsed as well as we’d like, unfortunately! If you answer the question it’ll still say “I only understood you as far as wanting to put the green tin can in the box.”
I think what’s going on here is that in both cases the parser hits “tin can” and tries to figure out what it might mean before processing the rest of the command. In the original example, there’s a somewhat obscure algorithm that decides that we’re more likely to mean the green tin can than the blue tin can. (The parser usually prefers things directly in the room to things on supporters or in containers.) Then, having picked the green tin can, it processes as much of the rest of the command as it can–but the grammar line it’s working on is “put [something] in [something],” and that only fits “put tin can in box.” Since there are leftover words in the command, it gives you the “I only understood you as far as…” error.
In the second example, it tries to process “tin can” again–but now it’s unable to choose a can for itself, since there are two cans directly in the room. So it asks a disambiguation question. (The disambiguation process is called directly from the internal routine that tries to figure out what thing matches a string of words at a given part of the grammar line.) But the disambiguation isn’t restricted to the things directly in the room–when it’s actively asking a disambiguation question, it lists every noun that the words in question could refer too. So it asks about all three cans.
But then, when it’s got its answer, it still has to process the rest of the command… and it still uses up the grammar line and has words left over in the command. So you get the “only understood you as far as…” error again. (In fact, what the disambiguation does is insert the answer you give into the original command and process it again, so the result of answering “green” to the disambiguation question is basically what you’d get if you typed “put green tin can in box on garbage heap”… or it might be “put tin can green in box on garbage heap,” I’m not sure.)
…if the terminology I’m using is unclear, btw, “grammar lines” are those Understand statements.