I always feel like that type of coding interview is a sort of engineering hazing. I know I am often consulting documentation, especially when working in a new problem-space or less familiar programming language!
I always try to give candidates the benefit of doubt with silly things like syntax or whatever since it's not like I'm interviewing for a live coding performer!