Fix windows crash in FOREACH_PARAM, due to accessing non-existent element
in the vector.