Raising a useful error and adding a speccific tests

Fixes #506
Okay. Please break this apart or decompose it -- it is really difficult to read a ternary that is broken over multiple lines and embedded within a list comprehension