Restore object that is exclusively used in assert()s

Commit 0feae75 removed a seemingly unused object ('c_grid'), but this
object is used in a number of subsequent assert()s.  This commit
reintroduces that object, but only in debug mode (i.e., when 'NDEBUG'
is *not* defined), and thus restores the debug build.

I don't know how this problem escaped my build testing, but I take full
responsibility and I do apologise for the build breakage.