"Seperation anxiety" at 3 months

Sam💫 • Miscarried first pregnancy early March 2015 at 5.5 weeks. Expecting our rainbow baby Feb. 2016 ❤️
My LO is 5 months old and for the past 2 months will typically not let anyone hold her. There are certain people and situations in which she will allow this to happen (can't figure out a rhyme or reason or any correlation) and then others where she hysterically cries until me or dad takes her back. I know it's not separation anxiety, but more so thinking she is aware that this person is not me or DH. Anyone else experience this? Tips/advice? How long did your baby do this? I am hoping this doesn't continue much longer!