[Razor] Fix NRE caused by docking changes

Looks like 6694f485 made some assumptions that weren't true
for the Razor editor's C# completion handlers.