Moaning when the workers' leader is causing trouble (7)

I believe the answer is:
wailing
'moaning' is the definition.
(thesaurus)
'the workers' leader is causing trouble' is the wordplay.
'leader' says to take the initial letters.
'is causing trouble' becomes 'ailing' (I can't justify this - if you can you should believe this answer much more).
The initial letter of 'workers' is 'w'.
'w'+'ailing'='WAILING'
'when' acts as a link.
Can you help me to learn more?
(Other definitions for wailing that I've seen before include "Jerusalem site sacred to Jews for prayer and lamentation" , "Greeting" .)
