Checks for references left open.
This could use a bunch of tuning, but it's a good start for improvement (Other types of references to ignore, situations to ignore, other references to flag, etc).