Osorkon II was the fifth king of the 22nd Dynasty. He took as his model Rameses II. He made his name similar, the easier to usurp Rameses' monuments. He usurped at Bubastis. However, his usurpations were not perfect. They are in all temple areas, but mostly in the hypostyle hall. Because of the incomplete recarving, Rameses II is recognizable. In addition to strengthening the presence of Bast, Osorkon II wanted the presence of Set gone. But like as with the cartouches, he did an incomplete job, so Set still shows!
He hoped to turn the depictions of Set into depictions of Maahes, as Set's epithets "the very valorous, the lord of the sky" could work for Maahes as well. In Plate XLII D-G, we can see #G looks to be a more convincing Maahes, but the rest, strongly Set!
From Ian Roberts Taylor's thesis Deconstructing the Iconography of Seth, I learned Osorkon I started these changes earlier as he "changed the dedication of the Ramesside temple at Bubastis from Amun, Ptah and Seth to the goddess Bastet." Osorkon II continued this as Maahes is the son of Bast (or Sekhmet).
In the Festival Hall, which Osorkon II commissioned, however, there are two images of Set in the Festival Hall, depicted with a human head. In one, he can be identified by his title "Nubty, Lord of the South-Land." The other features his name written phonetically:
Naville's image via Taylor, Set appears between Horus the Elder (HeruWer) and Thoth (Djehuty).
This translation is by S.E.B. Logan:
"First column: st-bAHw / Set [of the] Inundation
"Second column: di=f anx wAs nb / He gives all life [and] dominion
"Third column: di=f Hw(.w) nb / He gives all offering-meals
"Fourth column: di=f aq.w nb / He gives all victual-provisions."