Using entity URI for getting the appropriate term path.

Relate to issue #2620