Brown the ground meat with the garlic powder, cayenne pepper, salt and pepper, drain, and put in the bottom of a 13x9 baking dish. Spread the refried beans on top and place in the oven at 350 for 10 minutes.
Meanwhile, mix together corn, mayonnaise and green chilies in a bowl. Remove the meat/beans from oven and spread the corn mixture on top of it.
Mash the avocados and add the salsa making a guacamole (you can buy premade guacamole if you want but my personal preference is for fresh!). Spread on top of corn.
Top with diced tomatoes. Refrigerate till ready to serve.
This dip goes a lot further than you think it does so if you're not going to have 12-15 people eating it I recommend halving the recipe and putting it in a smaller dish. I have even it as much as two days later but the avocado gets yucky after that so I recommend only eating the leftovers the next day!