I've never seen any problems with a giant call stack, try making dummy hats so you can test to see what happens with a billion hats.Also, there may not be a need to use packages, please post code.
http://forum.blockland.us/index.php?topic=172670.msg4431143#msg4431143
You would only need that package once.
Oh yeah.. Now that you mention it, stupid me.
Which means if these hats are not all in one pack you will need a required add on containing that package.