Any visitor function that does a recursive call and then continues on to do more work needs to check whether or not the recursive call set error().
WHLSL is no longer relevant.