it does seem like something a good static analysis tool should be able to catch though