Add tests for lazy references