Fix for class based impls

This appears to fix the issue I was running into -- I added a test case which demonstrates the macro blowing up and this check appears to fix it.