get rid of redundant $ref resolution code
fix test (was testing 1 level too deep because of redundant code removed in 346552c)