If you add Site Columns to a site or web using code you can do it like this:
SPSite root = new SPSite("http://wss/sites/site");
SPWeb web = root.OpenWeb();
string fieldname = web.Fields.Add("TEST", SPFieldType.Text, true);
After adding a column this way my Site Gallery page (mngfield.asp) broke with the following error:
Object reference not set to an instance of an object. at Microsoft.SharePoint.ApplicationPages.FieldListRenderer.Render(HtmlTextWriter output)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
.....
The cause of this is the case sensitivity when using the Object Model to open site objects. The Site Gallery page uses the FieldListRenderer control to display all Site Columns. In the Render method (by using Reflector) you'll find a piece like:
SPWeb web = allWebs[field.Scope];
string title = web.Title;
In this case field is the actual Site Column and field.Scope stores the URL as it was once used to construct the parent web. In our code snippet it would contain "http://wss/sites/site". This value is used to get the web from allWebs, and this method turns out to be case sensitive...!! 
In my case the site was created with the url: http://wss/sites/Site. So the allWebs method returns null and the web.Title causes an Object reference exception.
By using the right casing everything was fixed in a second:
SPSite root = new SPSite(http://wss/sites/Site);
SPWeb web = root.OpenWeb();
string fieldname = web.Fields.Add("TEST", SPFieldType.Text, true);