Yes, in the 1970's, American Copyright Law made it illegal to create derivative works of existing, copyright-protected original works with some exceptions. It is not fair use to take a full fledged theme and create variations of it. This would be classified as a derivative work and derivative works require permission from the holder of the original copyright.
I don't agree with the limitations this imposes on creativity, especially since any collection of notes on a page should have no such expectation to "not" be used as a source of inspiration for additional creation. This is how creativity works in the first place, because we simply do not create anything from nothing at all.
When written enharmonically with D as the root we get the notes: D, E, F, Gb, A, Bb, C#.
Thus, we can see we almost have the scale of D harmonic minor but with a G flat.
In essence it is just a synthetic scale based upon the harmonic minor scale of D, with a flattened fourth degree.