Custom functions in master would show master as the source.
Post the deadlock graph? I'd guess there's some built-in function or procedure involved (those are stored in the resource DB)
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability