Found it when implementing HBASE-17045. Seems the final result of the scan is correct but no doubt the logic is broken. We need to fix it to stop things get worse in the future.
Client Compatibility breaks between versions 1.2 and 1.3
Make sure we always return the scanner id with ScanResponse
Unify the implementation of small scan and regular scan
Do not issue close scanner request if RS tells us there is no more results for this region