* commit '22e0ce3a': DO NOT MERGE Add locking to prevent races between setting class methods and marking