A few improvements to DwC automapping.

A bug fix and addition of case-insensitive term name matching.