This avoids a traceback that gave no clue as to what was happening. This is in line with the change from #1535