If an app registers an invalid capabilty we should not crash hard. Instead we should catch the exception. Log it (error) and carry on. * Added tests