If a son had died before his next brother was born, this younger brother was usually given the same name. The same goes, mutatis mutandis, for a daughter.
When a son passed away before his younger brother's birth, the younger brother usually received the same name as his deceased sibling.  The same practice also held true for daughters.