Add test for PR 14144

Forgot to include this in commit
7c4eb845a02c77dee6a9f8a650a9261ab1a7b25b
Disable occurrence typing for top-level variables

Closes PR 14121