Fixed validation in TreeBuilder for new 'lock_max_wait' parameter