There's a small (?) chance you'll get miles: If the K class on the, ticket-wise, NH-coded flight maps to any of the miles-earning booking classes on LH instead of K, you'll get some miles. But that requires that Murphy's law not be valid for you, something that is not possible due to... Catch-22.