1038309 - Fix bug where distributor type was being checked against the distributor id instead of the type id