kalua: new registrator: logic error in get_next_free