Fixed bug in QDIMCAS formatter to correctly encode hierarchical AND
components