Merge "Revert "Fix a redundant assignRelativeLayerForIme case"" into tm-dev