#KT-43682 Fixed
The old test sequence failed for toplevel functions because of file class wrappers, so that the second branch was never invoked.