I was curious how much coherency would help, thinking perhaps it's just the postcode that goes in the barcode too.
Apparently they also use a field "Delivery Point Suffix"
"A postcode is not always sufficient to uniquely identify each delivery point in the UK – for example, in shared buildings.
Some postcodes relate to only one delivery point, while others may cover up to a hundred. The average is 15.
For that reason a Delivery Point Suffix (DPS) has been developed. The DPS is a two character code (a number and a letter) which enables each delivery point to be identified.
The DPS can be created by extracting the postcode together with the house number or name using Royal Mail Postcode Address File (PAF)."