Issue #21709: Remove references to __file__ when part of a frozen application.
Closes #21709: Merged fix from 3.4.