Did you get the problem fixed?
If not the I believe Seerah was saying that given the error you reported, it was most likely that kgPanel16 is being anchored to itself thus creating the circular call:
kgPanel16:SetParent(kgPanel16) would call:
kgPanel16:SetParent(kgPanel16) would call:
kgPanel16:SetParent(kgPanel16) would call:
kgPanel16:SetParent(kgPanel16) would call:
kgPanel16:SetParent(kgPanel16) would call:
... and so on. After 10,000 or so of these circular calls the lua interpreter gives up and sh*ts on your carpet
.
Anchor kgPanel16 to another panel or UIParent and see what happens (adjusting X/Y coords accordingly).