adds safety check to avoid mesh coloring when using PMLs