Copy in query and running with F9 (ctrl-enter) stops before end

I have been hitting this problem a lot recently. I copy in a query from notepad++

For example:

select *
from reports r
join report_pages rp
on r.report_template_id = rp.report_id
join report_page_sections rps
on rp.report_page_id = rps.report_page_id
join report_section_series rss
on rps.report_page_section_id = rss.report_page_section_id
join waves w
on w.wave_id = rss.wave_id
join wave_respondents wr
on w.wave_id = wr.wave_id
join wave_respondent_responses wrr
on wr.wave_respondent_id = wrr.wave_respondent_id
and wrr.ref_type = 'RESIDENT_CONTACT_ID'
and wrr.ref_value = r.report_attribute_value
and wrr.question_id = 671 -- overall question only
join answers a
on wrr.answer_id = a.answer_id
and a.answer_value != 0
where r.report_id = 18818
group by r.report_attribute_value, rss.display_order, rss.series_label
order by rss.display_order, rss.series_label

I get an error "ORA-00904: "RSS"."SERIES_LA": invalid identifier"

It stops parsing before the end (removes the last 3 characters). If I highlight the query and then F9, it works. If I use F5 it works. If I use the code formatter (which screws up some of my formatting) it works.

However, I just want the pasted in code to work, as everything else is a pain when you have lots of queries in the file.. any suggestions?