AMP ScanByKey fix for 65535 tile limit issue + Buffer optimization