A slow pitstop from the Mercedes team may have cost Lewis Hamilton the chance to retain the race lead in front of his home fans.