Where was the Scarab before it merged with the current Blue Beetle, Jaime Reyes?
This is the origin story of Khaji Da. Khaji Da is created by a group of aliens known as the Reach. On it's first mission it tries to attach itself to a power child whom would later be know as Lady Styx. It the process of merging with Lady Styx she implements her powers to manifest what she calls "dollies" to ward off the attack. These dollies break the legs of Khaji Da sending it into a retreat where it is attacked by a Green Lantern and plummeted to earth.
On earth, damaged, it merges with a Mayan chief known as Sky Witness. Sky Witness and Khaji Da now merged lay waste to the Nahua people. Sky Witness became known as the god Quetzalcoatl.
Years later when Sky Witness became old he buried himself with Khaji Da, where they were both entombed until a treasure hunter finds Khaji Da ends up in the hands of Jaime Reyes.