Change the logic of checking for dynamic pointcuts

This PR should fix #159