@GSerg - Yeah, that's one issue - the returned
Material
really isn't a constant - there's nothing to prevent the caller from grabbing a reference to it. Ideally I'd combine this with one of the solutions from this QA to make the return value immutable, but that's a bit above and beyond. — Comintern 12 mins ago