For backward compatibility, make function exclusion optional