Provide some helpful error messages when link_to is used improperly

Should help out with situations like in #765.