Improved type-checking for tuple and record selects.
Fix typo in Java destruction code; should fix some recent bug reports of crashes in Java.