Fix bug with dates expression evaluation introduced in b88a6fac42378fe7013372170de24e5a27b7dc04