This can happen when emitting an inlinable function in a resilient
module, because inlinable functions use the most conservative
access pattern.
This allows some earlier tests for keypaths inside inlinable
functions to pass IR emission, too.
An existing test used an external reference within the same module
to test external references; move this part to a separate test that
builds a separate module to correctly test this functionality.