Append record stub & union pattern match case

This PR contains the previous one (#480) and contains union pattern match case appending instead of prepending.

You may want to merge the previous PR before this one.
You could use `Seq.last` here.