emerge seems to mishandle comments in package.mask when printing package.mask context. In my case, it prints only 3 irrelevant comments found in middle of the file instead of the actual package entry found at the end.
# emerge -1v pandoc
These are the packages that would be merged, in order:
Calculating dependencies... done!
!!! All ebuilds that could satisfy ">=dev-haskell/syb-0.1:=[profile?]" have been masked.
!!! One of the following masked packages is required to complete your request:
- dev-haskell/syb-0.7.1::gentoo (masked by: package.mask)
(dependency required by "app-text/pandoc-22.214.171.124::gentoo" [ebuild])
(dependency required by "pandoc" [argument])
For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.