Fix a minor bug in handling links in SDML.