Fix ineffective test on is popup, leading to a wrong url redirection whenever the view isn't a popup