Avoid crashing the compositor when a maximized window appears

A client like qmlscene --maximized starts a maximized window calling
set_maximized but the size is set later so we can't find the
output that can accomodates the window view.

In this case we just return the output for this view.
Fail with an error if the package is not loaded

Apparently when a package is not found isValid() returns true
nevertheless so we check the if the path is empty or not.