failing test case for #1465
restricted references can create implicit mappings (#1465)
fix test
refactor resolveRef
tidy up, remove unreachable condition
faster getKey() helper
add test
Merge branch 'dev' into gh-1465
remove #1566 test
Merge pull request #1565 from ractivejs/gh-1465

Restricted references should create implicit mappings if necessary