Optimize ve.filterArray a bit

Change-Id: I8fc9c8d5f57a4af3b5421c65664351f21e488c53