Make "projectTo2D throws without attribute" throw for the right reason

Needed in order to merge #1201