Test reading of pattern instance references.
Add helpers for printing pattern instance references.