Use ap_is_used() instead of of an own local bool variable

aaa