index.php: minor improvement in VIEWPATH definition code

Fixes an oversight from 806ca600d3669343ee7ae90a9b5d65be9dfdbefe
Merge pull request #2366 from vlakoff/develop

index.php: minor improvement in VIEWPATH definition code