Compensated compactness in the contact complex of Heisenberg groups