It is known that a (generalized) soluble group whose proper subgroups of infinite rank are abelian either is abelian or has finite rank. It is proved here that if G is a group of infinite rank such that all its proper subgroups of infinite rank have locally finite commutator subgroup, then the commutator subgroup G' of G is locally finite, provided that G satisfies a suitable generalized solubility condition. Moreover, a similar result is obtained for groups whose proper subgroups of infinite rank are quasihamiltonian.