Option "Allow a different input sources for each document" behaves erratic
I use multiple languages, and want to use option
Language & Text > Input Sources > Input source options > Allow a different one for each document.
But it is totally broken and erratic.
It does not remember each document's or application keyboard language, but instead appears to switch them randomly.
E.g. I open several tabs in Safari, open one of them and switch keyboard to Russian.
Now switch to another tab - it is U.S. (OK), switch back to previous tab - now that tab is U.S. too (Why?).
Even worse - open Terminal, switch to Russian, click System - U.S. (OK), click Terminal again - U.S. (Why?)
Sometimes it remembers the window' keyboard, sometimes does not and switches it randomly.
MacBook Pro, OS X Mountain Lion (10.8.2), Keyboards - U.S. and Russian PC.