Fix Sass imports outside of filter

Identical to #445, but on release-3.7.x instead of release-3.6.x.