If I make the transformation
$$ x_i \rightarrow x_i' = x_i + \delta x_i,$$
I find that the Lagrangian $L = L(x_i,\dot{x_i})$ transforms as
$$ L \rightarrow L' = L + \frac{\partial L}{\partial x_i} \delta x_i + \frac{\partial L}{\partial \dot{x_i}} \delta \dot{x}_i \\ = L + \frac{\partial L}{\partial x_i} \delta x_i + \frac{\partial L}{\partial \dot{x_i}} \frac{d}{dt}\delta x_i \\ =L + \frac{\partial L}{\partial x_i} \delta x_i + \frac{d}{dt}\bigg(\frac{\partial L}{\partial \dot{x_i}} \delta x_i\bigg) - \bigg(\frac{d}{dt}\frac{\partial L}{\partial \dot{x_i}}\bigg) \delta x_i \\ = L + \frac{d}{dt}\bigg(\frac{\partial L}{\partial \dot{x_i}} \delta x_i \bigg).$$
For a symmetry, we demand $L'=L$, which means
$$ \frac{d}{dt}\bigg(\frac{\partial L}{\partial \dot{x_i}} \delta x_i \bigg) = 0. \quad (\mathrm{1})$$
This is just Noether's theorem. However, I have also read in Goldstein, and other Classical mechanics texts, that if we transform the Lagrangian in such a way that it changes as
$$ L \rightarrow L' = L + \frac{d}{dt} F(x) \quad (\mathrm{2}), $$
$L'$ still extremises the action for the same path. So, surely for symmetry I do not have to demand the condition as given in $(\mathrm{1})$ because it is a total time derivative like $(\mathrm{2})$. Is Noether's theorem overly restrictive about Lagrangian transformations? Can I derive conserved quantities even if I allow the Lagrangian to change by a total time derivative?