I can't answer the context-aware pasting question, but I'll point out that if you paste the math content in as ordinary text, you can highlight it and hit ctrl-M to turn it into a math inset. (This works anywhere in the document, and in both directions -- you can also turn a math inset into plain text.)
/Paul