Fixed generic-infer so it won't produce the same messages more than once.