739 parse mappings correctly

Shall fix #739 by using a broader mechanic when trying to determine the link/mapping type/kind.

@nning could give this pull-request a little bit a priority? I need these changes in order to fix #676.