Checking Security Policies through an Enhanced Control Flow Analysis