Now, now; science is more of a process than a codified set of laws. Throw magic in the mix and it'll just work on figuring out how it works until it understands the rules again, and then we just relabel the result "science".
:) "Harry Potter and the Methods of Rationality" was an excellent fanfiction, where the premise was "what if Harry Potter was a scientist (and then a wizard)" and it's mostly about him trying to figure out the rules of magic and being far too powerful, hahaha