I tried fixing this bug, here is my pull request with QA_4_1 as base. https://github.com/phpmyadmin/phpmyadmin/pull/819...
I think after the above fix a new problem arises, below are the screenshot for better...