11. (if serving right away): Preheat the oven to 350 degrees F. Spray a 9x13-inch pan or 2-quart baking dish with nonstick spray.
2. In a large skillet, cook the ground beef and onion together over medium heat until the beef is browned and the onion is tender. Drain any fat, if needed. Stir in the chili powder, cumin, beans, and chiles; set aside.
3. In a medium bowl, whisk together the sour cream, flour and garlic powder.
4. Place half of the tortillas in the bottom of the prepared dish, tearing them apart as needed to cover the bottom (overlapping is fine). Top with half of the meat mixture, spoon half of the sour cream mixture on top of the meat, and drizzle 3/4 cup of the enchilada sauce on top of that. Repeat the layers one more time. At this point, you can cover the dish with plastic wrap and refrigerate up to 24 hours before baking.
5. To bake: Remove plastic wrap, cover with foil and bake for 40 minutes. Uncover, sprinkle with cheese and bake 5 minutes or so more, until the cheese is nice and bubbly. Serve immediately.