Move variable into assert to avoid unused variable warning.