BUG:395605 Fix issue where converting to paint layer selected the wrong layer afterwards
(cherry picked from commit c2bb2559e777604975fcd4a9ffee762e579abaeb)