Fixed a bug with invisible layers.
Merge commit '0081f44536edd38aeb3bd8942d23bd3425b9b5a8' into develop