I am not able to test it at the moment, but I think that it is a completely unrelated problem.
The problem with the missing Lazarus executable is that installing "Lazarus (4.0)" via GUI installs only the lazarus-ide-4.0 package (because that is the package that contains the *.desktop file and so it gets picked by the appstream-generator as the main package) and this package does not depend on the other required packages. Regards, Daniel