Upgrade: Fix problem with exception thrown on no view dependency

Users with no view dependency had failures for upgrade since
the script was looking for a list with dependent views. This update
moves the view check within the view depedency block instead of
outside it.