Merge "Log error when exceeding MAX_LAYERS count"