In general, anything costing up to 15,000 gold is fairly readily available. Anything costing more is not usually for sale for money.
Wish does not screw you over for using it for any of the listed purposes. If you use it off-label, it is capricious.
40 feet of solid material blocks (nearly) all spells. 40 feet underground, you can't scry on the surface or teleport there, and vice versa.
Polymorph uses the latest errata.
The swift-action changes replace all the weird casting times (like for feather fall and quickened spells)
The Rules compendium is a summary, not a primary source.
Divination only works reliably if I have enough forewarning to come up with a response easily.
Mindless undead:
Controlled mindless undead are mostly automatons. They're evil because they are powered by evil batteries.
Uncontrolled mindless undead either do what they were told last, or search for life to destroy.
Mindless undead usually do not interact with illusions, and usually automatically treat them as real.