Fixing ordering bugs in local engine tests

Change-Id: I4429895f6a342ee796b5b21291bd9de1da38d09e