This is not an easy situation for all involved. I lost my son when he was two do to his babysitters' neglect to her duties. He drowned. I was 27 and not only have/had at times felt children said some inappropriate things to me but also adults concerning my loss and his death. What saved me was I am educated in child development and I had already had three children before his death. So experience and education gave me the grace to accept what children will say at times. After all they are children not adults. Now adults it took a little bit more patience and understanding why such strange and sometimes cruel things were said to me but what I have learned is when someone loses someone especially a child or a pregnancy no one really knows what to say and well some people are just insensitive bores. But a child that is a whole different thing.
Not withstanding your neighbors ages and loss they may have no idea what to expect from children. They have had no children yet of their own. Plus grief is such a profound and aggressive intruder in our lives. It can be like orbiting around a black hole in space. . . or losing an arm...especially if it is an offspring.
Of course your daughter should not be held culpable for what she said. My daughters were three and eight when their brother died and were present. My own children said some very very painful things to me about their own brothers death...they still do sometimes. Everyones grief is different and everyone deals with it differently. There is no blue print on how to approach someone with a profound loss in their life. So how possibly could a child know. Professionals struggle with it so NO way should they hold your child accountable for being "inappropriate." But emotions are high and solutions are extremely limited.
My son drowned in 1987 and sometimes I still respond emotionally to folks statements about it like it just happened yesterday. but mostly now with adults I say it is a subject that isn't always easy for me to discuss yet and with children I say "You know I loved my son so so much and I miss him so much that sometimes I just can't talk about it" They usually respond better than adults.
Maybe you could tell your daughter that these parents just cannot talk about the loss of their baby it makes them so so sad...so let's not ask about their baby any more." Kind of make it a pack you both have together...not to talk to them about their loss but she can talk to you all she wants about it. That way she has options. Not that death is a taboo but talking about it, you have to find those that "want" to talk about it. And YOU are that person who wants to talk about it with her.
This is all just advise...mainly from personal experience and some from educational. As far as the parents...I believe you did an honorable thing by not shoving their obvious misunderstanding in their face. Take care of your daughter, take care of you and let time take care of them. My heart goes out to them and my respect to you.
A.