Ensure that inline errors are only scoped to the if block