Restore sqlite compatibility
Fix isVirtual checks for permissions entities