Add test for #3053. Fixes #3053.

Rebasing #10446 with a `pub fn main`