adds safety check to avoid mesh coloring when using PMLs

fixes #332