Use warnings.warn() to warn for scope change

Similar to #269, but drops the envvar