Minor optimization; only index into the function data once.