get_values copies submask to avoid mutating it