improved detection of finally blocks to avoid false positives in try
with resources