CRM-14091, CRM-14092 - Defensive programming
CRM-14091, CRM-14092 - restrictAccess - Avoid unnecessary writes
Merge pull request #2485 from totten/4.4-security-cleanup

CRM-14091, CRM-14092 - More caution