Don't reuse $result

Fix repurposing of variable.

Change-Id: Ie565a190ff1ea7d47633cba464bac555be80bb8a