WIP: views bug fixes when inner table schema is known