Fixing X/Y/Z dimension checks.

They now properly throw exceptions and will therefore properly set the
last validation exception