1. Pre-heat oven to 375 degrees F
2. Heat the olive oil in a large skillet over medium high heat. Add onions and garlic and cook until fragrant and onion is opaque. About 2 minutes.
3. Add the chili powder, salt, onion flakes, garlic powder and cumin. Next add the black beans, corn and can of green chilies. Stir and heat through.
4. Stir in the shredded chicken and cilantro. Heat through. Set aside.
5. Grease a 9x12 casserole pan. Layer the shredded corn tortillas on the bottom of the pan.
6. Pour the chicken mixture on top of the corn tortillas and spread out evenly.
7. Using the entire can of refried beans, dollop the beans over the chicken mixture. The chicken should still be warm, so wait a minute or two for the beans to warm. This will make it easier to spread them out. Spread the refried beans as best you can.
8. Pour the entire can of enchilada sauce evenly over the beans and chicken mixture.
9. Top with the shredded cheese.
10. Bake for 15 minutes, until cheese is melted and dish is bubbling.