[PATCH] Fix a crash when doing rev-tree