Fix test count
Make sub folding with attributes work

This is dodgy...I hope to get rid of these special cases someday.