classic ui: Fix incorrect behaviour of getcgivars() -- #5276

Fixed a *very* embarrassing oversight having to do with pointers
to the key and value in cmd.cgi.

refs: #5276
whatthecommit: How on Earth did I miss this???