Check for inconsistent dimension size information

Adresses #4