This occurs frequently - particularly with child actors because it is easier to get a nomination in the supporting categories. Mary Badham in To Kill a Mockingbird, Tatum O'Neal in Paper Moon and Haley Joel Osment in The Sixth Sense were all nominated in supporting for leading roles.
Adult leads are often positioned in support too - examples including Jamie Foxx in Collateral, Casey Affleck in The Assassination of Jesse James etc, Rooney Mara in Carol. It used to be that two same sex leads could easily get a nomination for a popular film (Amadeus, Terms of Endearment, Thelma & Louise etc) but nowadays the bigger star is usually promoted as lead, the other as supporting regardless of importance to the narrative.
Just this month Brad Pitt won a supporting Oscar for a co-lead - positioned in that category so he could romp to victory with ease over actors in much smaller roles.