Mark two local constants as static;
Rename MAGIC to DEBUG_NEW_MAGIC.
Use a new STATIC_ASSERT definition if the C++11 static_assert is available.