mkapidocs.py: associate the reference with the referenced item