Bug in CfgSubnets4::initSelector
Once the code detects that there is an RAI option it skips checking the subnet selection option whether or not the RAI option actually included a LINK SELECTION sub-option.
If a request arrives that has a relay option that doesn't include the link selection sub option and that does include the subnet selection option the code will end up using the GIADDR or if that doesn't exist fall back to one of the other choices.