Clear the layer pending queue when visibility sets to false.