[PAXEXAM-609] Correct order of acquired locks to avoid possible deadlock

For detailed analysis, please see: https://issues.apache.org/jira/browse/KARAF-2812