Keyboard and Emoji Viewer menu vs. Input menu?
I don't know exactly when Apple changed the behaviour of the icon in the menu bar
(somewhere between Yosemite and High Sierra?).

To recover a flag always telling you which is the keyboard in use, here is my workaround:

In:

System Preferences &gt; Keyboard &gt; Input Sources


add another keyboard mapping with the lower left + button.