resolves #1078 mark should not match hash inside entity reference