`break` is not strictly necessary here and could be removed.
Merging duplicated code.