local=TRUE, not local=local

local isn't defined in the outer calling loop.

duh