Using matrix stack - my code seems to modify the whole stack

I want to place objects using matrix stack, but the following code seems to modify the whole stack, so that using stack becomes a nonsense. What would you do in order to use stack? I need it to create a simple tree.

MatrixStack store;

void DrawTree1(glutil::MatrixStack &modelMatrix)
{
	int branches=3;
	float bl=14.0f;
	float ratio=0.55f;
	float bl1=bl*ratio;
	float bl2=bl1*ratio;
	float bl3=bl2*ratio;
	float r=0.9f;
	float x=20.0f;
	float y=20.0f;
	float z=0.5f;
	float z1=1.0f;
	float z2=1.5f;
	float z3=2.0f;
	float alpha=30.0f;

	modelMatrix.Translate(glm::vec3(x, bl/2, y));
	glutil::PushStack push(modelMatrix);
	modelMatrix.Scale(glm::vec3(r, bl, r));
	glUseProgram(UniformColorTint.theProgram);
	glUniformMatrix4fv(UniformColorTint.modelToWorldMatrixUnif, 1, GL_FALSE, glm::value_ptr(modelMatrix.Top()));
	glUniform4f(UniformColorTint.baseColorUnif, 0.5f, 0.5f, 0.5f, 0.0f);
	g_pCubeTintMesh->Render();
	glUseProgram(0);

	for(int i=0;i<=branches;i++)
	{
//		z=1.0f;
		glutil::PushStack pop(modelMatrix);
		glutil::PushStack push(modelMatrix);
		modelMatrix.Translate(glm::vec3(0, bl/2, 0));
		modelMatrix.RotateZ(alpha+sin(i*3.0f)*10.0f);
		modelMatrix.Translate(glm::vec3(0, bl1/2, 0));
		modelMatrix.Scale(1.0f,ratio,1.0f);
		glUseProgram(UniformColorTint.theProgram);
		glUniformMatrix4fv(UniformColorTint.modelToWorldMatrixUnif, 1, GL_FALSE, glm::value_ptr(modelMatrix.Top()));
		glUniform4f(UniformColorTint.baseColorUnif, 0.5f, 0.5f, 0.5f, 0.0f);
		g_pCubeTintMesh->Render();
		glUseProgram(0);
	}
}

Your push and pop calls are unbalanced. Your stack will be 1 item bigger after every time you call this function, and will eventually overflow.

Okay I can fix it easily, but why the whole stack is modified?