Better mode line handling for type comments

normalize_mode/3 and normalize_args/2 had no tests.  There were a few
places where they gave wrong answers.