Handle all-space corner case

Change-Id: I07981a63a30ac3d610be03e736188a6539884f01