Fix compilation error when compiling without affinity turned on. Does this seem like a reasonable fix to #261, @pdraper @matthieu? See merge request !309