fixed #368: Smarter semantic selection
fixed #374: Validation of record fields incorrect when records are nested