propagate some source locations for better error reporting

related to PR 14595