Yep, I think it's fine

We named our boy with a family name that had been used as a second name for one of his cousins.

If your sister wanted to use James as a first name they would have used it.

To me, middle names are really just a formality.