PRD-4613: Designtime code and NPE fix that broke the tests