Issue #22221: Add tests for compile() with source encoding cookie.