Merge "Fix a bug where device index is not skipped correct." into pi-dev
am: 75b3e6f302

Change-Id: Ifba1a52d5f9a3d3ca69a13ef769d22f0bf1402f9