Fixes for a few failing test cases in scan_by_key & transform_scan