How do I get around Profile API call deadlock when upgrading from SDK 5.0 to 5.1?