Improve track_function/unmasking tests