Fix initial content navigation
The content index from route data is now preferred over the stored
index. The stored index is only used, when no index is set as part of
the route. The previous behavior was hard to predict because the logic
could compare incompatible types (undefined > -1
etc.) and performed
arithmetic operations with them (undefined - 1
) in some cases.
Closes: #1074 (closed)