Fix for  context check in AbstractRazorControl