Merge "Nullcheck device profile when re-granting on package change"