cmake: avoid exception when printing "changed variables" message

If the changed cache variable was a list then this processing may
attempt to access beyond the last item in the list. Instead skip
printing the non-existing value and backup one to finish the loop.
1 file changed