Bugfix: Bug 16807 Avoid needBeforeDate on past dates