What an amazing issue! I'm in love! I've given you a PR to reduce the test further. The issue is related to the circular import between foo and qux, and the fact that qux forces foo to do ~something~ with its vtable to enable its use in the hashmap.