Handle record fields while checking unused open declarations

Fix #661.