[[ Bug 11315 ]] Incorrect index used in ramp creation in legacy gradient code.