Move the implementation of MaskBuffer to .cpp file, because of problems with the globale g_DebugZone variable