Switch two type errors to internal errors

One of these was broken and falling into that case would
raise a random runtime error anyway.