D.Core.Compile: add necessary constraint to onStyle