The category_code column in the borrower_attribute_types which is a varchar(1) is meant to refer to the categorycode column in the categories table which is a varchar(10). Category codes get truncated when trying to restrict an extended attribute to a specified category, breaking the functionnality unless the categorycode is one letter long.
borrower_attribute_types.category_code is varchar(10) now.