Fix for Trac #580, helpful error message thrown when using a wrongly named dimension.