This fixes #8367.  It was looking in the wrong place for the codes.