It sounds like anxiety to me. Beagles can tend to have OCD issues if they have anxiety - chew on their feet, lick the floor, rip toys etc. Rescue dogs have sometimes lived in 2 or more locations with different rules for potty. If kept in a cage for long periods of time at a shelter or puppy mill they learned to pee/poop inside. Be sure to use a cleaner special for pet accidents. Is she getting regular exercise time? That will reduce anxiety. One of my beagles, Molly, has "issues" with separation anxiety, fear anxiety and she is on prozac. If she does potty outside make sure you praise and reward her.
This site is really helpful too:http://www.aspca.org/pet-care/virtual-pet-behaviorist/dog-behavior/house-training-your-adult-dog
This site is really helpful too:http://www.aspca.org/pet-care/virtual-pet-behaviorist/dog-behavior/house-training-your-adult-dog