Tests for reference resolution when MetaType is used (IDE-1447)