check for duplicate definitions