Valgrind: Prevent invalid assertion.

Change-Id: I91748fd4ac43e9e00c0859209dbf39d10746b958
Reviewed-by: hjk <hjk121@nokiamail.com>