They're not legitimate in your scenario. Legitimate children of the mothers, are ones that have been born in matrimony, not out of wedlock.
(I don't know, maybe I'm misinterpreting it, especially since the original Japanese might be carrying some nuance lost in translation.)