Beware of major spoilers.
In Insidious Chapter 2, when the Grandmother and the three "Ghost Hunters" follow the lead from the past to find out what happened to Josh, they go to the old hospital and from there to the house of the old man (Parker Crane). That's when they realize that it has not been Elise who spoke through the dice to them, but Crane's insane mother (mater mortis). They also realize that Crane was the bride in black, a crazy murderer who killed many people in his lifetime and also the ghost appearing on Josh's old photographs.
At that moment they decide to go back to the family house, get Josh's wife and the kids out and try to sedate Josh, apparently because they now know that Josh is not really Josh, but Crane who took his body.
How did they make that connection from the visit to Crane's old house?