"Object reference not set to an instance of an object" when loading a SQL Server view into the project

When I try to load some views in the Database pane, PHPMaker shows "Object reference not set to an instance of an object" and the view cannot be added to the project. After systematic testing, the SQL constructs are irrelevant: the only discriminator is the length of the view definition — anything over 4000 characters fails.

Minimal reproduction — two views identical except for a padding comment:

CREATE VIEW dbo.TestShort AS
/* comment of ~3400 'x' characters */
SELECT id, name FROM dbo.users;
-- total definition length 3539 chars -> loads fine

CREATE VIEW dbo.TestLong AS
/* comment of ~4500 'x' characters */
SELECT id, name FROM dbo.users;
-- total definition length 4574 chars -> "Object reference not set to an instance of an object"

I also verified with short probe views that CTEs (WITH), derived tables, OUTER APPLY, UNION ALL, FORMAT(), cross-database three-part names and aggregations all load fine individually — as long as the definition stays under 4000 characters. Across all the real views the failing ones are exactly those with LEN(definition) > 4000 (e.g. 4320 and 7309 chars), while everything up to ~3300 loads.

Workaround I currently use: wrap each long view in a Custom View defined as SELECT * FROM dbo.TheLongView — the short wrapper always loads.