WIP: handle IRI mapping in new term definition. Partial implementation and partial tests.