Fix field being invalid when using collections, with regression test.