Fix visible range warnings and test

Change-Id: I526e7b98e0631b041e0063c9e31cb491e24f963b
Fix visible range tests

Change-Id: Id14bdb14fa45d5ce84ad212e20aad176f5e03cd4
Merge topic 'visible_range' into next

82984322 Fix visible range tests
4ae5a955 Fix visible range warnings and test