Bugfix for optional keepLastValue work-around

Change-Id: I4a50b609f9cb3594961c7a79dfcf6f63c48e4168