Incorporate block coloring fixes from master branch.