Fix licence types lookup to not require deprecated tbl_terms