Squish: Optimization in checkLastBuild()

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