Simplify the implementation of am-without-suffix attribute, improve tests