Can we include a test for this exception? Right now any changes in this logic won't be caught by existing tests AFAICT.