Only reset the message when changing the index-limit.

  Also log variable settings.
  New function: has_flag()

  This is now used for adding flags, to avoid repeats.

  This is part of #71.