fixed bug allowing redefinition of Reference ID