PatternScan: fixed bug in memory regions enumeration