Fix displaying Application Details page if no environment exists.

Change-Id: I58c0146efada0ebded0a3f3fe38530c4f668a5a1
Closes-Bug: #1297273
Merge "Fix displaying Application Details page if no environment exists."