handle package, msgid, and keywords being undefined
don't go past end of @msg when setting