Add compile-time checks on expanding-string function use