I've heard someone saying 小祖宗 to a little kid (literally: little ancestor).
I assumed it was some sort of general exclamation or lament, like 我的天呢!as the mood was of slight annoyance. However after inquiring some more it seems it is more or less equivalent to 难搞 — hard to please, a nuisance.
How come that a "little ancestor" becomes "a nuisance"?
There is this entry in Baidu, which is basically a copy-paste from Zdic.net, and does not explain the origin of the term.