Added test for #1639
Fixed #1639 NPE in MethodOrValueReferenceVisitor when it encounters dynamic value