Implications of gauge invariance for pion electroproduction at threshold