I was wondering why I hadn't seen this before. Bug is it may not work if you don't have an IP address on the lo0 interface.
There was some software in the past that was attempting to do local communication on the switch using 127.0.0.1 but misbehaving because a) we had firewall filters in place on lo0, and b) 127.0.0.1 was not explicitly configured. To deal with the problem at the time I updated our standard configurations to include the following:
set interfaces lo0 unit 0 family inet address 127.0.0.1/32
That ensures lo0 always exists and has an address. No negative repercussions assigning the loopback address to the loopback interface even if you don't use the loopback interface for anything else.
Using 127.0.0.1/32 is also a very useful trick when using apply-path prefix lists.
set policy-options prefix-list PL-BGP_PEERS 127.0.0.1/32
set policy-options prefix-list PL-BGP_PEERS apply-path "protocols bgp group <*> neighbor <*>"
If the apply-path doesn't exist (for example, no bgp peers yet) and there is no other prefix in the prefix list then the prefix list is effectively 0/0 (any). Add 127.0.0.1/32 to the prefix list and it now always has something and will always work as expected in the firewall filters.
Cheers!
-Chad