Allow passing new tree into `Builder.prototype.build`.

This allows the tree to be modified on running instance (will likely be useful
in testing scenarios for example).