Raising a useful error and adding a speccific tests

Fixes #506
```python
max(len(m.get(header, [])) for m in md) 
```