Improve field lookup behavior for dicts/mappings. Closes #2244. Closes #2243.