fix missing PROTECT in chunk.tapply