Material with custom code and tesselation does not compile

Sorry to bump this again but is there an update (looks like the prob. remains in 4.11)?
Is this going to be fixed? is there a workaround perhaps?

It would be really nice to be able to use the custom node with displacement.