Fixed problem with ghost tree hmax not being updated correctly