Test for #1209: metamodel refs of local declarations