be a bit more robust about detecting locking callback declarations (#3107)

1 file changed