Hi there!
It seems like you're using the AO shader in a way it was not intended to be used. Nevertheless, using the layer shader for combining the results should work fine (and it does work for me). Can you show us what does not work if you use the layer shader like astrofalcon suggested?