A lemma of variational distance between maximal functions with application to the skorokhod problem in a nonnegative orthant with state-dependent reflection directions