fix #1429 by correctly handling tags with dots

This was a very old regression. This used to work before the rails 3.2 upgrade... Added tests 
to prevent future unnoticed breakage