Fix error location for illegal pure statements