Check for global dofs before computing dofmap block size.

Fixes #331. The 'actual' bug is in FFC/UFC, see https://bitbucket.org/fenics-project/ffc/issue/61/.