Fixed a small bug in CartesianGrid that caused problems when raytracing.