fix polymorphicName var scope

see https://github.com/strongloop/loopback-datasource-juggler/issues/271

Signed-off-by: Clark Wang <clark.wangs@gmail.com>
Merge branch 'fix/polymorphicName-var-scope'