Seems like forcing the badge worked. Thanks.It's a known bug, but I don't think anybody knows what causes it. You're supposed to do Aster Town Gym/Kindling Woods first. Doing the Route 5 sidequest before the Badge will prevent you from getting it, as you've seen. You may be able to do something with Debug Mode (Down + X on the Title Screen), otherwise, you'll probably have to start over.