Adding the SSH-ALLOWED and SSH-DENY at the top did indeed get it to work, my apologies.
So as you say, this term allowed the protocol any tcp:
set firewall family inet filter protect-loopback term OSPF-ALLOW from protocol tcp
set firewall family inet filter protect-loopback term OSPF-ALLOW from protocol ospf
set firewall family inet filter protect-loopback term OSPF-ALLOW then accept
Does this therefore allow protocol TCP but only destined for SSH port 22?:
set firewall family inet filter protect-loopback term SSH-ALLOWED from protocol tcp
set firewall family inet filter protect-loopback term SSH-ALLOWED from destination-port ssh
Thanks for your help, I am fairly new to Junos!