[#1523] Fix bug which lead to have SelectedKeys handled two times and so caused a NPE on heavy load