Fix scope of _tileFunction