self install: in this context the project is not a package so we should set package-mode to false (#9302) (cherry picked from commit ef75e7c8)