am: fix --interactive HEAD tree resolution