Boundary effects on the maximal angle of stability of a granular packing