\Drupal\Core\Asset\CssOptimizer anchors all paths in the CSS with its base url. Aside of ignoring external and absolute paths, it should also ignore paths starting with a hash (#).
The current situation changes url(#diagonal-hatch) into url(/sites/default/files/css/optimized/%23diagonal-hatch).
See the attached patch which adds an exception in the regular expression.