fix sorting of map layer combo box and more const correctness