[Bug #8551] Minor optimization