Rewrite code for reporting non-portable calls for a bit better performance