better instructions for references to custom theorem environments

Custom theorem environments are not always referenced correctly (see example by Naum).

They need the correct references and translations like in ic.env.theorem.document-layer.clo.