Fix for Santhosh's more efficient code so that it mostly works.

###TODO:
* Prevent all tree selections from being wiped out every time the date
is changed.

Signed-off-by: SturmB <sturm359@gmail.com>