Use getCode() as is done in line 797 (Fix #2820)
Merge remote-tracking branch 'upstream/2.5.x' into 2.5.x-defrules