The ease with which one can "pierce the veil" varies dramatically from state to state. Another reason to be careful about your choice of location for corporate headquarters, employment, "significant contacts," and so forth.
In the meantime, how about IRS code that allows an inventor who owns his invention personally to take capital gains treatment on the sale of that invention contrasted with ownership by an LLC (even single person LLC) or other entity which subjects the owner at sale to normal income taxes at (usually) a much greater rate? I can imagine many convincing reasons for the entity to own the code. But why do that unless you have to? I would tend to want to own the code personally. More flexibility.