Squish: Using param instead of global var in checkLastBuild()

Change-Id: I9c7af050f9ff211cd5025fe5421449dcdee04f53
Reviewed-by: Christian Stenger <christian.stenger@digia.com>