Make the logic for serving pre-compressed files slightly stricter and fix a compile error on LDC 0.11.0.