Fix some compiler errors.

Missed these because I forgot to do a pm4 install -- I was still using
the outdated build of snow-common.
Add const deref of string iterator.
Fix erroneous call to next_code in peek_code.

Call came from back when the invalid argument was a template argument.