Test case showing incorrect refusal to demote
Simplified test case
Correctly choose the location for a demoted decl